package co.edu.poli.ficb.agl.automatable.gui;

import java.awt.Shape;

import org.apache.commons.collections15.Transformer;

import co.edu.poli.ficb.agl.automatable.modelo.automatas.Estado;
import co.edu.poli.ficb.agl.automatable.modelo.automatas.Transicion;
import edu.uci.ics.jung.graph.Graph;
import edu.uci.ics.jung.graph.util.Context;
import edu.uci.ics.jung.visualization.util.ArrowFactory;

/**
 * 
 * @author Diego Satoba
 *
 */
public class PAUndirectArrowTransformer implements Transformer<Context<Graph<Estado,Transicion>,Transicion>, Shape>{
	
	public static Shape undirectArrow;
	
	public PAUndirectArrowTransformer() {
		//this(5, 4);
		this(10, 8);
	}
	
	public PAUndirectArrowTransformer(float base, float height) {
		undirectArrow = ArrowFactory.getWedgeArrow(base, height);
	}

	@Override
	public Shape transform(
			Context<Graph<Estado, Transicion>, Transicion> context) {
		return undirectArrow;
	}
	
}
